package com.xjh.him.netty.codec;


import com.xjh.him.dto.friendgroupmsg.FriendGroupMsgDTO;
import com.xjh.him.dto.usergroupmsg.UserGroupMsgDTO;
import com.xjh.him.netty.dto.FriendApplyNotifyDTO;
import com.xjh.him.netty.dto.UserGroupMemberInviteNotifyDTO;
import com.xjh.him.netty.dto.UserSessionAddNotifyDTO;

public class Command {
    public static final byte USER_ID_REQ = 1;
    public static final byte FRIEND_APPLY_NOTIFY = 2;
    public static final byte FRIEND_GROUP_MSG_SEND = 3;
    public static final byte USER_SESSION_ADD_NOTIFY = 4;
    public static final byte USER_GROUP_MSG_SEND = 5;
    public static final byte USER_GROUP_MEMBER_INVITE_NOTIFY = 6;

    public static Class<?> getClazz(byte command) {
        Class<?> clazz = null;
        switch (command) {
            case USER_ID_REQ:
                clazz = Long.class;
                break;
            case FRIEND_APPLY_NOTIFY:
                clazz = FriendApplyNotifyDTO.class;
                break;
            case FRIEND_GROUP_MSG_SEND:
                clazz = FriendGroupMsgDTO.class;
                break;
            case USER_SESSION_ADD_NOTIFY:
                clazz = UserSessionAddNotifyDTO.class;
                break;
            case USER_GROUP_MSG_SEND:
                clazz = UserGroupMsgDTO.class;
                break;
            case USER_GROUP_MEMBER_INVITE_NOTIFY:
                clazz = UserGroupMemberInviteNotifyDTO.class;
                break;
        }
        return clazz;
    }
}
